package uk.ac.ebi.bioinvindex.model.impl.processing;

import uk.ac.ebi.bioinvindex.model.impl.MaterialImpl;
import uk.ac.ebi.bioinvindex.model.impl.StudyImpl;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * User: Nataliya Sklyar (nsklyar@ebi.ac.uk)
 * Date: Jul 30, 2007
 */
@Entity
@DiscriminatorValue( "MaterialNode" )
public class MaterialNodeImpl extends NodeImpl{

	private MaterialImpl material;

	protected MaterialNodeImpl() {
		super();
	}

	public MaterialNodeImpl(StudyImpl study) {
		super(study);
	}

	public MaterialNodeImpl(StudyImpl study, boolean original) {
		super(study, original);
	}

	@ManyToOne( targetEntity = uk.ac.ebi.bioinvindex.model.impl.MaterialImpl.class)
	@JoinColumn(name = "MATERIAL_ID", nullable = true )
	public MaterialImpl getMaterial() {
		return this.material;
	}

	public void setMaterial(MaterialImpl material) {
		this.material = material;
	}
}
